--
-- Description: script to create the EventTypes table.
-- Date created: 17 Apr 2008
--

set ANSI_NULLS on
set QUOTED_IDENTIFIER on
go

if not exists 
(
    select * 
    from dbo.sysobjects
    where id = object_id(N'[dbo].[EventTypes]')
    and objectproperty(id, N'IsUserTable') = 1
)
begin
    create table [dbo].[EventTypes]
    (
        [EventTypeID] smallint identity(1,1) not null
        , [EventTypeName] nvarchar(50) not null
        constraint [PK_EventTypes] primary key clustered
        (
            [EventTypeID] asc
        ) on [primary]
    ) on [primary]

    print ''
    print '*************************************************************************************'  
    print 'Created table [dbo].[EventTypes]'
    print '*************************************************************************************'  
    print ''
end
else
begin
    print ''
    print '*************************************************************************************'  
    print 'Table [dbo].[EventTypes] already exists.'
    print '*************************************************************************************'  
    print ''
end
